package com.zilue.controller;

import com.zilue.balance.domain.UserAccount;
import com.zilue.balance.returnresult.Result;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by ZD on 2017/5/25.
 */
@RestController
@RequestMapping("/user")
public class UserAccountController {

    @RequestMapping("getUser")
    public Result<UserAccount> getUserByCard(@RequestParam String seqNo, @RequestParam Integer cardType) {
        UserAccount userAccount= UserAccount.builder().id(seqNo+cardType).seqNo(seqNo).cardType(cardType).userName("虚拟用户").build();
        return Result.createSuccessResult(userAccount);
    }

    @RequestMapping("getInfo")
    public String getUserInfo(@RequestParam String seqNo, @RequestParam Integer cardType) {
        UserAccount userAccount= UserAccount.builder().id(seqNo+cardType).seqNo(seqNo).cardType(cardType).userName("虚拟用户").build();
        return userAccount.toString();
    }

}
